# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=yawast
_pkgname=yawast_ng
pkgver=0.12.1
pkgrel=1
epoch=1
pkgdesc='The YAWAST Antecedent Web Application Security Toolkit.'
groups=('blackarch' 'blackarch-webapp' 'blackarch-scanner' 'blackarch-fuzzer')
arch=('any')
url='https://pypi.org/project/yawast-ng/#files'
license=('BSD')
depends=('python' 'python-asn1crypto' 'python-attrs' 'python-beautifulsoup4'
         'python-certifi' 'python-cffi' 'python-chardet' 'python-colorama'
         'python-cryptography' 'python-dnspython' 'python-idna'
         'python-jsonschema' 'python-nassl' 'python-packaging' 'python-psutil'
         'python-publicsuffixlist' 'python-pycparser' 'python-pyparsing'
         'python-requests-mock' 'python-requests' 'python-selenium' 'python-six'
         'python-soupsieve' 'sslyze' 'python-tls-parser' 'python-urllib3'
         'python-validator-collection' 'python-wheel' 'python-vistir'
         'python-toml' 'python-dateutil' 'python-appdirs' 'python-distlib'
         'python-cached-property' 'python-cerberus' 'python-first'
         'python-importlib-metadata' 'python-more-itertools' 'python-pep517'
         'python-ordered-set' 'python-orderedmultidict' 'python-pip-shims'
         'python-plette' 'python-tomlkit' 'python-zipp' 'python-requirementslib'
         'python-webdriver-manager')
makedepends=('python-build' 'python-pip')
source=("https://files.pythonhosted.org/packages/source/${pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('8ba36d80c2a1273f06c46797ebd07d3ef0ded13d0a234bbb5bea5c94c85c239d010142f21528425c8bad58c736d88a673461e5f5170dad7e0ef9fe2a78a63583')

build() {
  cd "$_pkgname-$pkgver"

  python -m build --wheel --outdir="$startdir/dist"
}

package() {
  cd "$_pkgname-$pkgver"

  pip install \
    --verbose \
    --disable-pip-version-check \
    --no-warn-script-location \
    --ignore-installed \
    --no-compile \
    --no-deps \
    --root="$pkgdir" \
    --prefix=/usr \
    --no-index \
    --find-links="file://$startdir/dist" \
    $_pkgname
}

